﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;

namespace Shop.Web.Models.Passport
{
    public class RegisterModel
    {
        [Required]
        [Display(Name = "用户名")]
        public string NickName
        {
            get;
            set;
        }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "邮箱")]
        public string Email
        {
            get;
            set;
        }

        [Required]
        [StringLength(100, MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password
        {
            get;
            set;
        }

        [DataType(DataType.Password)]
        [Display(Name = "确认密码")]
        [Compare("Password", ErrorMessage = "两次输入的密码不一致。")]
        public string ConfirmPassword
        {
            get;
            set;
        }
    }
}